package com.blb.zy_community.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.SysDictData;
import com.blb.zy_community.mapper.SysDictDataMapper;
import com.blb.zy_community.mapper.SysDictTypeMapper;
import com.blb.zy_community.service.ISysDictDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 字典数据表 服务实现类
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
@Service
public class SysDictDataServiceImpl extends ServiceImpl<SysDictDataMapper, SysDictData> implements ISysDictDataService {

    @Autowired
    private SysDictDataMapper sysDictDataMapper;

    @Override
    public Page<SysDictData> getSysDictDataPage(Page<Object> objectPage, String dictType, Long dictLabel, String status) {
        Page<SysDictData> sysDictDataPage = sysDictDataMapper.selectSysDictDataPage(objectPage, dictType, dictLabel, status);

        return sysDictDataPage;
    }

    @Override
    public List<SysDictData> getSysDictDataBySysDictTypeName(String sysDictTypeName) {
        List<SysDictData> sysDictDataList = sysDictDataMapper.selectSysDictDataBySysDictTypeName(sysDictTypeName);
        return sysDictDataList;
    }
}
